#include<bits/stdc++.h>
#define N 100005
using namespace std;
int a[N],n,ans;
int main(){
	freopen("duel.in","r",stdin);
	freopen("duel.out","w",stdout);
	scanf("%d",&n);
	for(int i=1;i<=n;i++)scanf("%d",&a[i]);
	sort(a+1,a+n+1);
    for(int i=1,j=1;i<=n;i++){
    	while(j<=n&&a[j]<=a[i])j++;
    	if(j>n)ans++;
    	else j++;
    }printf("%d",ans);
    return 0;
}